import java.util.Vector;

public class Hero extends Tank {
    Bullet bullet = null;
    Boolean isLive = true;
    Vector<Bullet> vector = new Vector<>();
    public Hero(int x, int y) {
        super(x, y);
    }
    public void shotEnemyTank(){
        if (vector.size() == 5){
            return;
        }
        switch (getDirect()) {
            case 0:
                bullet = new Bullet(getX()+12, getY()-10, 0);
                break;
            case 1:
                bullet = new Bullet(getX()+60, getY()+12, 1);
                break;
            case 2:
                bullet = new Bullet(getX()+12, getY()+65, 2);
                break;
            case 3:
                bullet = new Bullet(getX()-12, getY()+12, 3);
                break;
        }
        vector.add(bullet);
        for (Bullet b: vector
        ) {
            new Thread(b).start();
        }

    }


}
